package com.ryskoo.basicdata.area.street.repository;

import com.ryskoo.basicdata.area.street.domain.StreetPO;
import com.ryskoo.common.constant.CacheConstant;
import com.ryskoo.framework.core.repository.BasicRedisImpl;
import com.ryskoo.framework.core.utils.RedisUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Repository;

import javax.annotation.PostConstruct;

/**
 * @author qyc
 */
@Primary
@Repository
public class StreetRedisImpl extends BasicRedisImpl<StreetPO> implements IStreetRepository{
    @Autowired
    private RedisUtil redisClient;

    @Autowired
    private IStreetRepository streetRepository;

    /**
     * 街道/乡镇缓存KEY
     */
    private static final String cacheKey = CacheConstant.BDS_AREA_STREET_KEY;

    @PostConstruct
    public void init() {
        this.setRedisClient(redisClient);
        this.setDao(streetRepository);
    }

    public StreetRedisImpl() {
        super(cacheKey);
    }

   

}
